package com.san.hkhospital.service.impl;

import com.san.hkhospital.vo.Search3;
import com.san.hkhospital.vo.meduseTableVO;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.List;
import com.san.hkhospital.entity.MedUseExample;
import com.san.hkhospital.mapper.MedUseMapper;
import com.san.hkhospital.entity.MedUse;
import com.san.hkhospital.service.MedUseService;
import org.springframework.transaction.annotation.Transactional;

/**
 * ClassName:MedUseServiceImpl
 * PackageName:com.san.hkhospital.service.impl
 * Description:
 *
 * @Author:yy
 * @CreatedAt:2024/11/13 14:38
 * 
 */
 
 
@Service
@Transactional
public class MedUseServiceImpl implements MedUseService{

    @Resource
    private MedUseMapper medUseMapper;

    @Override
    public long countByExample(MedUseExample example) {
        return medUseMapper.countByExample(example);
    }

    @Override
    public int deleteByExample(MedUseExample example) {
        return medUseMapper.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer muId) {
        return medUseMapper.deleteByPrimaryKey(muId);
    }

    @Override
    public int insert(MedUse record) {
        return medUseMapper.insert(record);
    }

    @Override
    public int insertSelective(MedUse record) {
        return medUseMapper.insertSelective(record);
    }

    @Override
    public List<MedUse> selectByExample(MedUseExample example) {
        return medUseMapper.selectByExample(example);
    }

    @Override
    public MedUse selectByPrimaryKey(Integer muId) {
        return medUseMapper.selectByPrimaryKey(muId);
    }

    @Override
    public int updateByExampleSelective(MedUse record,MedUseExample example) {
        return medUseMapper.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(MedUse record,MedUseExample example) {
        return medUseMapper.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(MedUse record) {
        return medUseMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(MedUse record) {
        return medUseMapper.updateByPrimaryKey(record);
    }

    @Override
    public MedUse find(Integer id) {
        return medUseMapper.selectByPrimaryKey(id);
    }

    @Override
    public List<meduseTableVO> findAll() {
        return medUseMapper.findAll();
    }

    @Override
    public boolean add(MedUse medUse) {
        int i = medUseMapper.insertSelective(medUse);
        return i>0?true:false;
    }

    @Override
    public boolean update(MedUse medUse) {
        int i = medUseMapper.updateByPrimaryKeySelective(medUse);
        return i>0?true:false;

    }

    @Override
    public List<meduseTableVO> search(Search3 search3) {
        return medUseMapper.search(search3);
    }

}
